package cn.ac.cintcm.sh.service;

import java.util.List;

import cn.ac.cintcm.sh.dao.CommentDao;
import cn.ac.cintcm.sh.domain.Comment;



public class CommentService {
 
	public CommentDao commentDao = new CommentDao();
	
	public int updateDate(Comment comment){
	  if(comment.getId() == null)
		  return  commentDao.insertDate(comment);
	  else
		return commentDao.updateDate(comment);
	}
	
	public int delDate(Long id){
		return this.commentDao.delDate(id);
	}
	
	public List getComment(Long itemId){
		if(itemId == null)
			return null;
			
		return this.commentDao.getComment(itemId);
	}
}
